﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCSignatureNew.ascx.cs" Inherits="MTRC.ODMS.Web.SOM.Popup.UCSignatureNew" %>
  

<style type="text/css">
    .style1
    {
        width: 233px;
    }
</style>
  

<script type="text/javascript">

    function ReSetSingnature(a) {
        document.getElementById("hdnSignType").value = a;
        /*Comment by jack 20151013 for u230*/
        if (a == 1) {
            document.getElementById("hdnSignType").value = '1complete';
        }
        /**********************************/
        __doPostBack(document.getElementById('<%=this.hdnForRefresh.ClientID%>').id, "")
    }

    function OpenSignatureForm() {
        document.getElementById("SignaturePic").style.display = "";
        document.getElementById("SignaturePaint").style.display = "none";
        document.getElementById("SignaturePhoto").style.display = "none";
        
    }

    function ShowHandWritten() {
        //Modify by elvis on 20180131 for SER-2018056 （default not load  SignaturePaint.）-->
        //document.getElementById("SignaturePaint").style.display = "";
        //<--Modify by elvis on 20180131 for SER-2018056 （default not load  SignaturePaint.）
        
        document.getElementById("SignaturePic").style.display = "none";
        document.getElementById("SignaturePhoto").style.display = "none";

    }

    function ShowPhotoWritten() {
        document.getElementById("SignaturePhoto").style.display = "";
        document.getElementById("SignaturePic").style.display = "none";
        document.getElementById("SignaturePaint").style.display = "none";

//        document.getElementById("hdnSignType").value = "3";
//        document.forms[0].submit();

//        return false;
    }

    //add by gordon 20150813
    function OpenHandWrittenForm(isReadOnly, eventSignType, signatureFullFileName) {

        //add by tim 20160701
        document.getElementById("hidBtton").click();
        //end add
        var result;
        var urlSignature;
        urlSignature = '../Popup/PopupSignatureContainer.htm?isReadOnly=' + isReadOnly + '&eventSignType=' + eventSignType + '&FormTitle=<%=this.GetLabel("SOM_SignType_HandWritten")%>' + '&signatureFullFileName=' + signatureFullFileName;
        result = window.showModalDialog(urlSignature, "newwin1", "DialogWidth:233px;DialogHeight:210px;help:no;status:no;scroll:no");
    }


</script>

  <%-- <iframe src="../UserControl/UCSignatureFrame.aspx" with="400px" height="400px"></iframe>--%>

  <table style="width: 233px;border:1px;">
      <tr>
          <td class="style1">
               <fieldset style="clear:both;width:233px;height:165px">
                  <div runat="server" id="SignaturePaint" clientidmode="Static"> 
                     <iframe height="165px" scrolling="no" frameborder="0" noresize="noresize" src="../../SOM/Popup/PopupSignatureH5.aspx" style="width: 233px"></iframe>
                  </div>
                  <div runat="server"  id="SignaturePhoto" clientidmode="Static" style="display:none">
                     <%--<iframe height="165px" scrolling="no" frameborder="0" noresize="noresize" src="../../SOM/Popup/PopupPhotoCaptureNew.aspx" style="margin:0px;width: 233px"></iframe>--%><%--Remove by jack 20160201 for ISU38 Disabled the Photo Capture--%>
                  </div>
                  <div runat="server" width="233px" clientidmode="Static" height="165px" id="SignaturePic" style="display:none">
                    <asp:Image ID="imgSignaturePic" Width="233px" Height="165px" runat="server" /> 
                  </div>
              </fieldset>
          </td>
      </tr>
      <tr>
          <td class="style1">
          <%--<asp:Button ID="Button1" runat="server" Text="Photo Capture" OnClientClick="javascript:window.open('../../SOM/Popup/PopupSignatureNew.aspx')"
                  Width="100px"  />--%>
                   <%--<asp:Button ID="btnPhotoCapture" runat="server" Text="Photo Capture" OnClientClick="ShowPhotoWritten();return false;" Width="98px"/>--%>
                   <asp:Button ID="btnPhotoCapture" runat="server" Text="Photo Capture222" OnClientClick="ShowPhotoWritten();return false;" Width="98px" Enabled="true"/> <%--Update by jack 20160201 for ISU38 Disabled the btnPhotoCapture button--%>
                    <asp:Button ID="btnHandWritten" runat="server" Text="Handwritten11"  
                  OnClientClick="ShowHandWritten();return" Width="98px"  onclick="btnHandWritten_Click"  />
                  <%--<input id="BtnPhotoCapture" type="button" value="<%=this.GetLabel("SOM_SignType_PhotoCapture") %>" onclick="ShowPhotoWritten()"; style="width: 98px"/>--%>
                  <%--<input id="BtnHandwritten" type="button" value="<%=this.GetLabel("SOM_SignType_HandWritten") %>" onclick="ShowHandWritten()"; style="width: 98px"/>--%>
                
                 
          <asp:Image ID="imgSignature" runat="server" 
                  ImageUrl="~/Images/SOM/Sign_UnSignature.gif" BorderColor="gray" BorderWidth="1"
                  style="width: 18px"  />
             
          </td>
      </tr>
  </table>
  
  <input type="hidden" clientidmode="Static" id="hdnSignType" name="hdnSignType" value="" runat="server">
  <input type="hidden" id="hdnSignFileName" name="hdnSignFileName" value="" runat="server">
  <input type="hidden" id="hdnForRefresh" name="hdnForRefresh" value="Intial Value" runat="server" onserverchange="hdnForRefresh_ServerChange"> 

  








